package com.yanqu.road.entity.cricket.court;

import java.util.Comparator;

/**
 * 竞技场排序
 */
public class CricketCourtRankListSort implements Comparator<CricketCourtUserData> {
    @Override
    public int compare(CricketCourtUserData o1, CricketCourtUserData o2) {
        if (o2.getScore() != o1.getScore()) {
            return o2.getScore() - o1.getScore() > 0 ? 1 : -1;
        }
        if (o1.getUpdateTime() != o2.getUpdateTime()) {
            return o1.getUpdateTime() - o2.getUpdateTime() > 0 ? 1 : -1;
        }
        return 0;
    }

}
